1. Field of the Invention
The present invention generally relates to techniques for improving program performance on computing devices. More specifically, the present invention relates to techniques that improve program performance by tracking memory locations that have been enregistered using additional available registers.
2. Related Art
Binary translation techniques facilitate translating object code targeted for one hardware implementation to execute on another hardware implementation. For instance, such techniques facilitate translating a binary generated for one instruction set architecture (ISA) to a second ISA. While binary translation may involve significant overhead, it allows applications to be run transparently across different architectures without recompilation. Such techniques can simplify distributing program code across a wide range of architectures, and can be extremely useful when access to program source code is restricted.
Note, however, that a compiler typically generates object code to match the feature set of an intended target architecture. For instance, a compiler typically generates code which is optimized for the given number of registers available in the intended target architecture. Note that re-optimizing existing object code to take advantage of the different characteristics of a new target architecture is a complicated process which is typically not performed during binary translation. Hence, binary translation typically does not take full advantage of the resources available in the new target architecture. For instance, when a new target architecture includes more registers than the original intended target architecture, such additional registers may be left unused.
“Enregistering” techniques use such additional registers to cache frequently accessed memory locations, thereby improving performance. However, these enregistering techniques need to ensure that situations where multiple threads attempt to access the same memory location do not violate the correctness of memory sharing. For instance, if a system allows a memory location that was enregistered by a first program thread to be accessed by a second program thread, the second program thread may receive a value that is not up-to-date.
Hence, what is needed is a method that facilitates enregistering memory locations without the above-described limitations of existing techniques.